#include<stdio.h>
#include<stdlib.h> 
struct Student
{
int num;
char name[20];
float score;
};
int main()
{
struct Student stu[5]={{101,"Wang",88},{102,"wan",78},{103,"li",96},{104,"ling",73},{105,"YUn",80}};
struct Student temp;
const int n=5;
int i,j,k;
printf("the order is:\n");
for(i=0;i<n-1;i++)
{k=i;
for(j=i+1;j<n;j++)
if(stu[j].score>stu[k].score)
k=j;
temp=stu[k];stu[k]=stu[i];stu[i]=temp;
}
for(i=0;i<n;i++)
printf("%d,%s,%d",stu[i].num,stu[i].name,stu[i].score);
printf("\n");
return 0;
}
